<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <%@ include file="/common/ssb/include/common-base.jsp"%>
  <title>保险产品管理</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>

<!-- Part 一、 以下是body主体内容的模块区域 -->
<body class="hold-transition ${sysColor} sidebar-mini">
<div class="wrapper">

  <!-- top start -->
  <%@include file="/common/ssb/top.jsp" %>
  <!-- top end -->
  <!-- left start -->
  <%@include file="/common/ssb/left.jsp" %>
  <!-- left end-->

  <div class="content-wrapper">
    <!-- Main start -->
	<section class="content">
	  			<div id="div_hidden_content" class="hidden" style="display:none;">
	  			    <input name="templateType" type="hidden" value="all"/>
                    <div id="hidden_common_final">
                        <!-- temp="hidden_common_final" start -->
										<input name="mainObjName" type="hidden" value="ssInsurPro">
										<input name="mainObjPrimaryKey" type="hidden" value="infoId">
										<input name="objNameAll" type="hidden" value="ssInsurPro">
				<!-- temp="hidden_common_final" end -->
                     </div>
                    <!-- temp="delForm_hidden" start -->
									<div id="delForm_hidden" style="display:none;">
										<input type="hidden" name="pageName" value="ss-insur-pro"/>
										<input type="hidden" name="formName" value="delForm"/>
									</div>
				<!-- temp="delForm_hidden" end -->
					<div class="form-control-static"
						 id="addForm1_ssInsurPro_upFlag"
						 data-temp-obj="ssInsurPro.upFlag"
						 data-dict-code="dictItemList"
						 data-dict-cate="yesOrNo"
						 data-colmun="" data-condition=""
						 data-type-tag="radio" data-def="">
						[radio]
					</div>
	  			</div>
      <div class="row">
        <div class="col-xs-12">
        
          <!------搜索  start ------->
          <div class="box box-info">
             <!--搜索title  start --> 
	          <div class="box-header with-border">
                 <h3 class="box-title"><i class="fa fa-search"></i> 保险产品管理搜索</h3>
                 <div class="box-tools pull-right">
    				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
 				 </div>
              </div>
            <!--搜索title  end --> 
            <div class="box-body">
            	<form id="searchForm" action="javascript:;">
	            	<!-- temp="searchForm_hidden" start -->
									<div id="searchForm_hidden" style="display:none;">
										<input type="hidden" name="pageName" value="ss-insur-pro"/>
										<input type="hidden" name="formName" value="searchForm"/>
										<input type="hidden" name="orderBy" value="ssInsurPro.create_time desc"/>
									</div>
				<!-- temp="searchForm_hidden" end -->
					
	              	<!-- temp="searchForm_content" start -->
				<div id="searchForm_content" class="form-group"  data-temp-code="true" data-temp-type="searchForm" data-temp-form-id="searchForm">


					<table class="table table-bordered bordercolor">
						<tbody>
						<tr>
							<td class="active" align="right"><label class="form-control-static">保险公司简称：</label></td>
							<td>
								<div class="form-group"><input name="ssInsurPro.wl_insurShortName"
															   class="form-control clean" maxlength="30"
															   data-temp-obj="ssInsurPro.insurShortName"></div>
							</td>
							<td class="active" align="right"><label class="form-control-static">平台产品代码：</label></td>
							<td>
								<div class="form-group"><input name="ssInsurPro.wl_proCode" class="form-control clean"
															   maxlength="30" data-temp-obj="ssInsurPro.proCode"></div>
							</td>
							<td class="active" align="right"><label class="form-control-static">平台产品类型：</label></td>
							<td>
								<div class="form-group"><select id="searchForm_ssInsurPro_proType"
																name="ssInsurPro.wl_proType" class="form-control  clean"
																data-temp-obj="ssInsurPro.proType"
																data-dict-code="dictItemList"
																data-dict-cate="proCategory" data-type-tag="select"
																data-def="">
									<option value="" remark="" selected="selected"> --请选择--</option>
								</select></div>
							</td>
						</tr>
						</tbody>
					</table>

				</div>
				<!-- temp="searchForm_content" end -->
			  	</form>
			  <div class="box-footer text-center">
			       <button type="button" class="btn btn-success" onclick="getTableData();" data-temp-event="searchForm_hidden"><i class="fa fa-search"></i> 查询</button> 
			       <button type="button" class="btn btn-warning" onclick="mytools.cleanData('#searchForm');">重置 </button>
			   </div>
            </div>
	     </div>
	     <!------- 搜索 end -------->
           
        <!------- 列表 start -------->
          <div class="box box-success">
            <!--列表title  start --> 
	          <div class="box-header with-border">
                 <h3 class="box-title"><i class="fa fa-table"></i> 查询结果 
                 　　　              <button id="button_to_add" onclick="toAdd();" class="btn btn-success" type="button"><i class="fa fa-plus-circle"></i> 增加 </button>
                 </h3>
                 <div class="box-tools pull-right">
    				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
 				 </div>
              </div>
			  <div class="box-body">
              	 	<table id="dataList" class="table table-bordered table-hover">
              	 		<thead>
		                	<tr id="dataList_thead_content" data-temp-code="true" data-temp-type="table" data-temp-show="dataList_template_content">
			                	<th>序号</th>
			                	<!-- temp="dataList_thead_content" start -->

											<th data-temp-obj="ssInsurPro.insurShortName">保险公司简称</th>
											<th data-temp-obj="ssInsurPro.agentRiskCname">平台产品名称</th>
											<th data-temp-obj="ssInsurPro.proCode">平台产品代码</th>
<%--											<th data-temp-obj="ssInsurPro.riskName">保险公司险类名称</th>--%>
											<th data-temp-obj="ssInsurPro.riskCname">保险公司险种名称</th>
											<th data-temp-obj="ssInsurPro.proType">平台产品类型</th>
											<th data-temp-obj="ssInsurPro.upFlag">是否上架</th>
											<th data-temp-obj="ssInsurPro.createTime">创建时间</th>
											<th>操作</th>
				<!-- temp="dataList_thead_content" end -->
		                	</tr>
	                	</thead>
		                <tbody id="dataList-body">
		                	
		                </tbody>
	              </table>
            	</div>
           	 	
           	 	<div class="box-footer text-center">
			      	<ul id="dataList-page" class="pagination">
					</ul>
			 	</div>              
           </div>
        <!------- 列表 end -------->
        </div>
      </div>
  
<div win-title="添加窗口" class="modal fade" id="my_modal_add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:80%;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							×
						</button>
						<h4 class="modal-title">
							<font color="red">信息添加</font> 
						</h4>
					</div>

					<div class="modal-body">
						
					       <div class="nav-tabs-custom">
					            <ul class="nav nav-tabs" id="myTab-add">
								</ul>
					              
					            <!-- tab content start -->
					            <div class="tab-content">
					            
					               <div class="tab-pane active" id="tabAdd_1">
									   <form class="form-horizontal addFormBody" role="form" id="addForm1"
											 action="javascript:void(0)">
										   <input type="hidden" class="formToken" id="addForm1_formToken"
												  name="formToken"/>
										   <!-- temp="addForm1_hidden" start -->
										   <div id="addForm1_hidden" style="display:none;">
											   <input type="hidden" name="pageName" value="ss-insur-pro"/>
											   <input type="hidden" name="formName" value="addForm"/>
											   <input type="hidden" name="ssInsurPro.insurShortName"
													  id="add_insurShortName" value="">
										   </div>
										   <!-- temp="addForm1_hidden" end -->

										   <!-- temp="addForm1_content" start -->
										   <div id="addForm1_content" data-temp-code="true" data-temp-type="addForm"
												data-temp-form-id="addForm1">

											   <table class="table table-bordered bordercolor" data-sort="sortDisabled">
												   <tbody>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司名称：</label></td>
													   <td>
														   <div class="form-group"><select
																   id="addForm1_ssInsurPro_insurCode"
																   name="ssInsurPro.insurCode"
																   onchange="selectText(this,'#add_insurShortName','#addForm1_insurShortName','F')"
																   class="form-control  clean"
																   data-temp-obj="ssInsurPro.insurCode"
																   data-dict-code="dymicSql" data-dict-cate=""
																   data-colmun="{value:'insurCode',text:'insurFullName',other:'insurShortName'}"
																   data-obj-name="ssInsurCpy"
																   data-page-name="ss-insur-cpy"
																   data-form-name="searchForm" data-condition=""
																   data-type-tag="select" data-def="" placeholder="必填项"
																   data-bv-notempty="true"
																   data-bv-notempty-message="不能为空" >
															   <option value="">--请选择--</option>
														   </select></div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司简称：</label></td>
													   <td >
														   <div class="form-control-static"><span id="addForm1_insurShortName"></span></div></td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">平台产品代码：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.proCode"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.proCode"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-regexp="true"
																						  data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						  data-bv-regexp-message="只能是数字和字母组成！"
																						  data-bv-notempty-message="不能为空"
																						  onblur="mytools.validFieldRepeat(this)"
																						  data-validate-repeat-message="平台产品代码已存在，请更换！">
														   </div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">平台产品名称：</label></td>
													   <td>
														   <div class="form-group"><input
																   name="ssInsurPro.agentRiskCname"
																   class="form-control clean" maxlength="30"
																   data-temp-obj="ssInsurPro.agentRiskCname"
																   placeholder="必填项" data-bv-notempty="true"
																   data-bv-notempty-message="不能为空"></div>
													   </td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司险类代码：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.riskClass"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.riskClass"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-regexp="true"
																						  data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						  data-bv-regexp-message="只能是数字和字母组成！"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司险类名称：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.riskName"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.riskName"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司险种代码：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.riskCode"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.riskCode"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空"
																						  data-bv-regexp="true"
																						  data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						  data-bv-regexp-message="只能是数字和字母组成！"
																						  onblur="mytools.validFieldRepeat(this)"
																						  data-validate-repeat-message="产品代码已存在，请更换！">
														   </div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保险公司险种名称：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.riskCname"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.riskCname"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">平台产品类型：</label></td>
													   <td>
														   <div class="form-group"><select
																   id="addForm1_ssInsurPro_proType"
																   name="ssInsurPro.proType"
																   class="form-control  clean"
																   data-temp-obj="ssInsurPro.proType"
																   data-dict-code="dictItemList"
																   data-dict-cate="proCategory"
																   data-type-tag="select" data-def="" placeholder="必填项"
																   data-bv-notempty="true"
																   data-bv-notempty-message="不能为空">
															   <option value="" remark="" selected="selected"> --请选择--
															   </option>
														   </select></div>
													   </td>
													   <%--<td class="active" align="right"><label
															   class="form-control-static">是否上架：</label></td>
													   <td>
														   <div class="form-group">
															   <div class="form-control-static"
																	id="addForm1_ssInsurPro_upFlag"
																	name="ssInsurPro.upFlag"
																	data-temp-obj="ssInsurPro.upFlag"
																	data-dict-code="dictItemList"
																	data-dict-cate="yesOrNo"
																	data-colmun="" data-condition=""
																	data-type-tag="radio" data-def="">
																   [radio]
															   </div>
														   </div>
													   </td>--%>
												   </tr>
                                                   <tr>
                                                       <td class="active" align="right"><label
                                                               class="form-control-static">展示顺序：</label></td>
                                                       <td>
                                                           <div class="form-group"><input name="ssInsurPro.orderNo"
                                                                                          class="form-control clean"
                                                                                          maxlength="30"
                                                                                          data-temp-obj="ssInsurPro.orderNo"
                                                                                          placeholder="必填项"
                                                                                          data-bv-notempty="true"
                                                                                          data-bv-notempty-message="不能为空">
                                                           </div>
                                                       </td>
													   <td class="active" align="right"><label
															   class="form-control-static">产品缩略图：</label></td>
													   <td>
														   <div class="form-group">
															   <div file-box="true" name="ssInsurPro.smallUrl"
																	data-temp-obj="ssInsurPro.smallUrl"
																	data-type-tag="uploadImg"  data-file-type="image/*"
																	data-upload-folder="pro"><img file-img="true"
																								  src="${ctx}/images/plateform/def.jpg"
																								  style="width:120px;height:80px;">
																   <label file-btn="true"
																		  onclick="addUploadFileNew(this);"
																		  for="uploadFileInputNew"
																		  class="btn btn-warning">选择图片</label> <input
																		   file-input="true" name="ssInsurPro.smallUrl"
																		   type="hidden" class="clean"> <a
																		   file-a="true" href="#" style="display:none;"
																		   target="_bank"></a> <label file-msg="true"
																									  style="color:red;display:none;"></label>
															   </div>
														   </div>
													   </td>
												   </tr>
												   <tr>
                                                       <td class="active" align="right"><label
                                                               class="form-control-static">产品主要图：</label></td>
                                                       <td>
                                                           <div class="form-group">
                                                               <div file-box="true" name="ssInsurPro.picUrl"
                                                                    data-temp-obj="ssInsurPro.picUrl"
                                                                    data-type-tag="uploadImg"  data-file-type="image/*"
                                                                    data-upload-folder="pro"><img file-img="true"
                                                                                                  src="${ctx}/images/plateform/def.jpg"
                                                                                                  style="width:120px;height:80px;">
                                                                   <label file-btn="true"
                                                                          onclick="addUploadFileNew(this);"
                                                                          for="uploadFileInputNew"
                                                                          class="btn btn-warning">选择图片</label> <input
                                                                           file-input="true" name="ssInsurPro.picUrl"
                                                                           type="hidden" class="clean"> <a
                                                                           file-a="true" href="#" style="display:none;"
                                                                           target="_bank"></a> <label file-msg="true"
                                                                                                      style="color:red;display:none;"></label>
                                                               </div>
                                                           </div>
                                                       </td>
                                                       <td class="active" align="right"><label
                                                               class="form-control-static">产品特色图：</label></td>
                                                       <td>
                                                           <div class="form-group">
                                                               <div file-box="true" name="ssInsurPro.traitUrl"
                                                                    data-temp-obj="ssInsurPro.traitUrl"
                                                                    data-type-tag="uploadImg"  data-file-type="image/*"
                                                                    data-upload-folder="pro"><img file-img="true"
                                                                                                  src="${ctx}/images/plateform/def.jpg"
                                                                                                  style="width:120px;height:80px;">
                                                                   <label file-btn="true"
                                                                          onclick="addUploadFileNew(this);"
                                                                          for="uploadFileInputNew"
                                                                          class="btn btn-warning">选择图片</label> <input
                                                                           file-input="true" name="ssInsurPro.traitUrl"
                                                                           type="hidden" class="clean" > <a
                                                                           file-a="true" href="#" style="display:none;"
                                                                           target="_bank"></a> <label file-msg="true"
                                                                                                      style="color:red;display:none;"></label>
                                                               </div>
                                                           </div>
                                                       </td>
                                                   </tr>
												  <!-- <tr>
												  	<td class="active" align="right"><label
                                                               class="form-control-static">保险范围：</label></td>
                                                       <td>
                                                           <div class="form-group"><input name="ssInsurPro.insureScope"
                                                                                          class="form-control clean"
                                                                                          maxlength="30"
                                                                                          data-temp-obj="ssInsurPro.insureScope"
                                                                                          placeholder="必填项"
                                                                                          data-bv-notempty="true"
                                                                                          data-bv-notempty-message="不能为空">
                                                           </div>
                                                       </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保额（元）：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.amount"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.amount"
																						  data-bv-regexp="true"
																						  data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						  data-bv-regexp-message="只能输入数字！"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
													   <td colspan="2">

													   </td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">保费（元）：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.premium"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.premium"
																						  data-bv-regexp="true"
																						  data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						  data-bv-regexp-message="只能输入数字！"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保费计量单位：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.proUnit"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.proUnit"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空">
														   </div>
													   </td>
												   </tr>
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">保险期限：</label></td>
													   <td>
														   <div class="form-group"><input name="ssInsurPro.insureLimit"
																						  class="form-control clean"
																						  maxlength="30"
																						  data-temp-obj="ssInsurPro.insureLimit"
																						  placeholder="必填项"
																						  data-bv-notempty="true"
																						  data-bv-notempty-message="不能为空" data-bv-regexp="true"
																						  data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						  data-bv-regexp-message="只能输入数字！">
														   </div>
													   </td>
													   <td class="active" align="right"><label
															   class="form-control-static">保险期限单位：</label></td>
													   <td>
														   <div class="form-group">
															   <div class="form-control-static"
																	id="addForm1_ssInsurPro_insureLimitUnit"
																	name="ssInsurPro.insureLimitUnit"
																	data-temp-obj="ssInsurPro.insureLimitUnit"
																	data-dict-code="dictItemList"
																	data-dict-cate="insureLimitUnit"
																	data-colmun="" data-condition=""
																	data-type-tag="radio" data-def="Y">
																   [radio]
															   </div>
														   </div>
													   </td>
												   </tr>-->
												   <tr>
													   <td class="active" align="right"><label
															   class="form-control-static">产品介绍：</label></td>
													   <td colspan="3">
														   <div class="form-group">
															   <textarea class="form-control clean" rows="2" maxlength="1000" placeholder="产品介绍" name="ssInsurPro.proIntroduce"></textarea>
														   </div>
													   </td>
												   </tr>
												   </tbody>
											   </table>
										   </div>
										   <!-- temp="addForm1_content" end -->


										   <div class="form-group">
											   <div class="col-sm-12">
												   <div class="box-footer text-center">
													   <button class="btn btn-success pull-left" type="button"
															   onclick="mytools.closeModal('my_modal_add');"> 取消
													   </button>
													   <button class="btn btn-danger pull-right" type="button"
															   onclick="submitForm1('addForm1','');"
															   data-temp-event="addForm1_hidden"> 提 交
													   </button>
												   </div>
											   </div>
										   </div>

									   </form>
					               </div>

				            </div>
					            <!-- tab content e -->
				          </div>	
			                
					</div>
				</div>
				<!-- /.modal-content -->
			</div>		
</div>  

<div win-title="修改窗口" class="modal fade" id="my_modal_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:80%;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							×
						</button>
						<h4 class="modal-title">
							<font color="red">信息修改</font> 
						</h4>
					</div>
					<div class="modal-body">
						 <div class="nav-tabs-custom">
					            <ul class="nav nav-tabs" id="myTab-edit">
<%--									<li class="active"><a href="#tabEdit_1" data-toggle="tab" >产品基本信息</a></li>--%>
					            </ul>
					            
					            <!-- tab content start -->
					            <div class="tab-content">
					            
					               <div class="tab-pane active" id="tabEdit_1">
					                  <form class="form-horizontal editFormBody" role="form" id="editForm1" action="javascript:void(0)">
									    <input type="hidden" class="formToken" id="editForm1_formToken" name="formToken" />
									    <!-- temp="editForm1_hidden" start -->
									<div id="editForm1_hidden" style="display:none;">
										<input type="hidden" name="pageName" value="ss-insur-pro"/>
										<input type="hidden" name="formName" value="editForm"/>
										<input type="hidden" name="ssInsurPro.w_infoId" data-name="ssInsurPro.infoId" class="ssInsurPro_infoId clean">
										<input type="hidden" id="editinsurShortName" name="ssInsurPro.insurShortName" data-name="ssInsurPro.insurShortName"  class="ssInsurPro_insurShortName clean" value="">
									</div>
				<!-- temp="editForm1_hidden" end -->
										
										<!-- temp="editForm1_content" start -->
										  <div id="editForm1_content">
											  <table class="table table-bordered bordercolor" data-sort="sortDisabled">
												  <tbody>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司名称：</label></td>
													  <td>
														  <div class="form-group"><select
																  id="editForm1_ssInsurPro_insurCode"
																  name="ssInsurPro.insurCode"
																  class="form-control  clean"
																  data-temp-obj="ssInsurPro.insurCode"
																  data-dict-code="dymicSql" data-dict-cate=""
																  data-colmun="{value:'insurCode',text:'insurFullName',other:'insurShortName'}"
																  data-obj-name="ssInsurCpy"
																  data-page-name="ss-insur-cpy"
																  data-form-name="searchForm" data-condition=""
																  data-type-tag="select" data-def="" placeholder="必填项"
																  data-bv-notempty="true"
																  data-bv-notempty-message="不能为空"
																  data-name="ssInsurPro.insurCode"
																  onchange="selectText(this,'#editinsurShortName','#editForm1_insurShortName','T')">
															  <option value="">--请选择--</option>
														  </select></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司简称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  id="editForm1_insurShortName" data-name="ssInsurPro.insurShortName"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品代码：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.proCode"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.proCode"
																						 data-name="ssInsurPro.proCode"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空"
																						 data-bv-regexp="true"
																						 data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						 data-bv-regexp-message="只能是数字和字母组成！"
																						 onblur="mytools.validFieldRepeat(this)"
																						 data-validate-repeat-message="平台产品代码已存在，请更换！"
																						 data-validate-repeat-selfname="ssInsurPro.w_infoId">
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品名称：</label></td>
													  <td>
														  <div class="form-group"><input
																  name="ssInsurPro.agentRiskCname"
																  class="form-control clean" maxlength="30"
																  data-temp-obj="ssInsurPro.agentRiskCname"
																  data-name="ssInsurPro.agentRiskCname"
																  placeholder="必填项" data-bv-notempty="true"
																  data-bv-notempty-message="不能为空"
																  onblur="mytools.validFieldRepeat(this)"
																  data-validate-repeat-message="平台产品名称已存在，请更换！"
																  data-validate-repeat-selfname="ssInsurPro.w_infoId">
														  </div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险类代码：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.riskClass"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.riskClass"
																						 data-name="ssInsurPro.riskClass"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空"
																						 data-bv-regexp="true"
																						 data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						 data-bv-regexp-message="只能是数字和字母组成！">
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险类名称：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.riskName"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.riskName"
																						 data-name="ssInsurPro.riskName"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险种代码：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.riskCode"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.riskCode"
																						 data-name="ssInsurPro.riskCode"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空"
																						 data-bv-regexp="true"
																						 data-bv-regexp-regexp="^[0-9a-zA-Z_]+$"
																						 data-bv-regexp-message="只能是数字和字母组成！"
																						 onblur="mytools.validFieldRepeat(this)"
																						 data-validate-repeat-message="产品代码已存在，请更换！"
																						 data-validate-repeat-selfname="ssInsurPro.w_infoId">
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险种名称：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.riskCname"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.riskCname"
																						 data-name="ssInsurPro.riskCname"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品类型：</label></td>
													  <td>
														  <div class="form-group"><select
																  id="editForm1_ssInsurPro_proType"
																  name="ssInsurPro.proType" class="form-control  clean"
																  data-temp-obj="ssInsurPro.proType"
																  data-dict-code="dictItemList"
																  data-dict-cate="proCategory" data-type-tag="select"
																  data-def="" data-name="ssInsurPro.proType" placeholder="必填项"
																  data-bv-notempty="true"
																  data-bv-notempty-message="不能为空">
															  <option value="" remark="" selected="selected"> --请选择--
															  </option>
														  </select></div>
													  </td>
													  <%--<td class="active" align="right"><label
															  class="form-control-static">是否上架：</label></td>
													  <td>
														  <div class="form-group">
															  <div class="form-control-static"
																   id="editForm1_ssInsurPro_upFlag"
																   name="ssInsurPro.upFlag"
																   data-temp-obj="ssInsurPro.upFlag"
																   data-dict-code="dictItemList"
																   data-dict-cate="yesOrNo" data-colmun=""
																   data-condition="" data-type-tag="radio" data-def=""
																   data-name="ssInsurPro.upFlag">[radio]
															  </div>
														  </div>
													  </td>--%>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">展示顺序：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.orderNo"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.orderNo"
																						 data-name="ssInsurPro.orderNo"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
                                                      <td class="active" align="right"><label
                                                              class="form-control-static">产品缩略图：</label></td>
                                                      <td>
                                                          <div class="form-group">
                                                              <div file-box="true" name="ssInsurPro.smallUrl"
                                                                   data-temp-obj="ssInsurPro.smallUrl"
                                                                   data-type-tag="uploadImg"  data-file-type="image/*"
                                                                   data-upload-folder="pro"><img file-img="true"
                                                                                                 src="${ctx}/images/plateform/def.jpg"
                                                                                                 style="width:120px;height:80px;"
                                                                                                 data-name="ssInsurPro.smallUrl">
                                                                  <label file-btn="true"
                                                                         onclick="addUploadFileNew(this);"
                                                                         for="uploadFileInputNew"
                                                                         class="btn btn-warning">选择图片</label> <input
                                                                          file-input="true" name="ssInsurPro.smallUrl"
                                                                          type="hidden" class="clean"
                                                                          data-name="ssInsurPro.smallUrl"> <a
                                                                          file-a="true" href="#" style="display:none;"
                                                                          target="_bank"></a> <label file-msg="true"
                                                                                                     style="color:red;display:none;"></label>
                                                              </div>
                                                          </div>
                                                      </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">产品主要图：</label></td>
													  <td>
														  <div class="form-group">
															  <div file-box="true" name="ssInsurPro.picUrl"
																   data-temp-obj="ssInsurPro.picUrl"
																   data-type-tag="uploadImg"  data-file-type="image/*"
																   data-upload-folder="pro"><img file-img="true"
																								 src="${ctx}/images/plateform/def.jpg"
																								 style="width:120px;height:80px;"
																								 data-name="ssInsurPro.picUrl">
																  <label file-btn="true"
																		 onclick="addUploadFileNew(this);"
																		 for="uploadFileInputNew"
																		 class="btn btn-warning">选择图片</label> <input
																		  file-input="true" name="ssInsurPro.picUrl"
																		  type="hidden" class="clean"
																		  data-name="ssInsurPro.picUrl"> <a
																		  file-a="true" href="#" style="display:none;"
																		  target="_bank"></a> <label file-msg="true"
																									 style="color:red;display:none;"></label>
															  </div>
														  </div>
													  </td>
                                                      <td class="active" align="right"><label
                                                              class="form-control-static">产品特色图：</label></td>
                                                      <td>
                                                          <div class="form-group">
                                                              <div file-box="true" name="ssInsurPro.traitUrl"
                                                                   data-temp-obj="ssInsurPro.traitUrl"
                                                                   data-type-tag="uploadImg"  data-file-type="image/*"
                                                                   data-upload-folder="pro"><img file-img="true"
                                                                                                 src="${ctx}/images/plateform/def.jpg"
                                                                                                 style="width:120px;height:80px;"
                                                                                                 data-name="ssInsurPro.traitUrl">
                                                                  <label file-btn="true"
                                                                         onclick="addUploadFileNew(this);"
                                                                         for="uploadFileInputNew"
                                                                         class="btn btn-warning">选择图片</label> <input
                                                                          file-input="true" name="ssInsurPro.traitUrl"
                                                                          type="hidden" class="clean"
                                                                          data-name="ssInsurPro.traitUrl"> <a
                                                                          file-a="true" href="#" style="display:none;"
                                                                          target="_bank"></a> <label file-msg="true"
                                                                                                     style="color:red;display:none;"></label>
                                                              </div>
                                                          </div>
                                                      </td>
                                                  </tr>
												<!--  <tr>
												<td class="active" align="right"><label
															  class="form-control-static">保险范围：</label></td>
													  <td>
                                                          <div class="form-group"><input name="ssInsurPro.insureScope"
                                                                                         class="form-control clean"
                                                                                         maxlength="30"
                                                                                         data-temp-obj="ssInsurPro.insureScope"
                                                                                         data-name="ssInsurPro.insureScope"
                                                                                         placeholder="必填项"
                                                                                         data-bv-notempty="true"
                                                                                         data-bv-notempty-message="不能为空">
                                                          </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保额（元）：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.amount"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.amount"
																						 data-name="ssInsurPro.amount"
																						 data-bv-regexp="true"
																						 data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						 data-bv-regexp-message="只能输入数字！"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
													  <td colspan="2"></td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保费（元）：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.premium"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.premium"
																						 data-name="ssInsurPro.premium"
																						 data-bv-regexp="true"
																						 data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						 data-bv-regexp-message="只能输入数字！"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保费计量单位：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.proUnit"
																						 class="form-control clean"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.proUnit"
																						 data-name="ssInsurPro.proUnit"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空">
														  </div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险期限：</label></td>
													  <td>
														  <div class="form-group"><input name="ssInsurPro.insureLimit"
																						 maxlength="30"
																						 data-temp-obj="ssInsurPro.insureLimit"
																						 data-name="ssInsurPro.insureLimit"
																						 placeholder="必填项"
																						 data-bv-notempty="true"
																						 data-bv-notempty-message="不能为空"
																						 class="form-control clean" data-bv-regexp="true"
																						 data-bv-regexp-regexp="^\d+$|^\d*\.\d+$"
																						 data-bv-regexp-message="只能输入数字！">
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险期限单位：</label></td>
													  <td>
														  <div class="form-group">
															  <div class="form-control-static"
																   id="editForm1_ssInsurPro_insureLimitUnit"
																   name="ssInsurPro.insureLimitUnit"
																   data-temp-obj="ssInsurPro.insureLimitUnit"
																   data-dict-code="dictItemList"
																   data-dict-cate="insureLimitUnit" data-colmun=""
																   data-condition="" data-type-tag="radio" data-def=""
																   data-name="ssInsurPro.insureLimitUnit">[radio]
															  </div>
														  </div>
													  </td>
												  </tr>-->
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">产品介绍：</label></td>
													  <td colspan="3">
														  <div class="form-group">
															  <textarea class="form-control clean" rows="2" maxlength="1000" placeholder="产品介绍"
																		name="ssInsurPro.proIntroduce" data-name="ssInsurPro.proIntroduce"></textarea>
														  </div>
													  </td>
												  </tr>
												  </tbody>
											  </table>
										  </div>
				<!-- temp="editForm1_content" end -->
																                    
					                    <div class="form-group">
								        	<div class="col-sm-12">
									         <div class="box-footer text-center">
												<button class="btn btn-success pull-left" type="button" onclick="mytools.closeModal('my_modal_edit');"> 取消 </button>
				                				<button class="btn btn-danger pull-right" type="button" onclick="submitForm1('editForm1','');" data-temp-event="editForm1_hidden"> 提 交 </button>
					            			</div>
				            				</div>
				            			</div>
					                  </form>
					               </div>


				            </div>
					            <!-- tab content e -->
				          </div>	
					</div>
				</div>
				<!-- /.modal-content -->
	</div>		
</div>  

<div win-title="查看窗口" class="modal fade" id="my_modal_view" tabindex="-2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:80%;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							×
						</button>
						<h4 class="modal-title">
							<font color="red">查看详情</font> 
						</h4>
						<form id="viewForm" action="javascript:void(0)">
							<!-- temp="viewForm_hidden" start -->
									<div id="viewForm_hidden" style="display:none;">
										<input type="hidden" name="pageName" value="ss-insur-pro"/>
										<input type="hidden" name="formName" value="searchForm"/>
										<input type="hidden" name="ssInsurPro.w_infoId" value=''/>
									</div>
				<!-- temp="viewForm_hidden" end -->
						</form>
					</div>
					<div class="modal-body viewForm">
						
						<div class="nav-tabs-custom">
					            <ul class="nav nav-tabs" id="myTab-view">
<%--									<li class="active"><a href="#tabView_1" data-toggle="tab" >产品基本信息</a></li>--%>
					            </ul>
					            
					            <!-- tab content start -->
					            <div class="tab-content">

					               <div class="tab-pane active" id="tabView_1">
					                  <form class="form-horizontal" role="form" id="viewForm1" action="javascript:void(0)">
					              		
					              		<!-- temp="viewForm1_content" start -->
										  <div id="viewForm1_content" class="row viewForm">

											  <table class="table table-bordered bordercolor" data-sort="sortDisabled">
												  <tbody>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司名称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  id="viewForm1_ssInsurPro_insurCode" data-dict-cate=""
																  data-dict-code="dymicSql" data-type-tag="select"
																  data-page-name="ss-insur-cpy"
																  data-form-name="searchForm" data-obj-name="ssInsurCpy"
																  data-condition="" data-name="ssInsurPro.insurCode"
																  data-colmun="{value:'insurCode',text:'insurFullName',other:'insurShortName'}"></span>
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司简称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.insurShortName"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品代码：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.proCode"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品名称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.agentRiskCname"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险类代码：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.riskClass"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险类名称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.riskName"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险种代码：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.riskCode"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险公司险种名称：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.riskCname"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">平台产品类型：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  id="viewForm1_ssInsurPro_proType"
																  data-dict-cate="proCategory"
																  data-dict-code="dictItemList" data-type-tag="select"
																  data-name="ssInsurPro.proType"
																  data-dict="proCategory"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">是否上架：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  id="viewForm1_ssInsurPro_upFlag"
																  data-dict-cate="yesOrNo" data-dict-code="dictItemList"
																  data-type-tag="radio" data-name="ssInsurPro.upFlag"
																  data-dict="yesOrNo"></span></div>
													  </td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">展示顺序：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.orderNo"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">产品缩略图：</label></td>
													  <td>
														  <div  class="form-control-static"><img data-type-tag="uploadImg"
																								 src="${ctx}/images/plateform/def.jpg"
																								 data-name="ssInsurPro.smallUrl"
																								 style="width:120px;height:80px;"
																								 data-type-tag="uploadImg" data-def="${ctx}/images/plateform/def.jpg"></div>
													  </td>
												  </tr>
												  <tr>
                                                      <td class="active" align="right"><label
                                                              class="form-control-static">产品主要图：</label></td>
                                                      <td>
                                                          <div  class="form-control-static"><img data-type-tag="uploadImg"
                                                                  src="${ctx}/images/plateform/def.jpg"
                                                                  data-name="ssInsurPro.picUrl"
                                                                  style="width:120px;height:80px;"
                                                                  data-type-tag="uploadImg" data-def="${ctx}/images/plateform/def.jpg"></div>
                                                      </td>
                                                      <td class="active" align="right"><label
                                                              class="form-control-static">产品特色图：</label></td>
                                                      <td>
                                                          <div class="form-control-static"><img data-type-tag="uploadImg"
                                                                  src="${ctx}/images/plateform/def.jpg"
                                                                  data-name="ssInsurPro.traitUrl"
                                                                  style="width:120px;height:80px;"
                                                                  data-type-tag="uploadImg" data-def="${ctx}/images/plateform/def.jpg"></div>
                                                      </td>
                                                  </tr>
												  <!--
												  <tr>
												  <td class="active" align="right"><label
															  class="form-control-static">保险范围：</label></td>
													  <td>
                                                          <div class="form-control-static"><span
                                                                  data-name="ssInsurPro.insureScope"></span></div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保额（元）：</label></td>
													  <td>
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.amount"></span></div>
													  </td>
													  <td colspan="2"></td>
												  </tr>
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">保费（元）：</label></td>
													  <td>保险期限
														  <div class="form-control-static">
															  <span  data-name="ssInsurPro.premium"></span>
															  <span data-name="ssInsurPro.proUnit"></span>
														  </div>
													  </td>
													  <td class="active" align="right"><label
															  class="form-control-static">保险期限：</label></td>
													  <td>
														  <div class="form-control-static">
															  <span  data-name="ssInsurPro.insureLimit"></span>
															  <span id="viewForm1_ssInsurPro_insureLimitUnit"
																	  data-dict-cate="insureLimitUnit" data-dict-code="dictItemList"
																	  data-type-tag="radio" data-name="ssInsurPro.insureLimitUnit"
																	  data-dict="insureLimitUnit"></span>
														  </div>
													  </td>
												  </tr>-->
												  <tr>
													  <td class="active" align="right"><label
															  class="form-control-static">产品介绍：</label></td>
													  <td colspan="3">
														  <div class="form-control-static"><span
																  data-name="ssInsurPro.proIntroduce"></span></div>
													  </td>
												  </tr>
												  </tbody>
											  </table>
										  </div>
				<!-- temp="viewForm1_content" end -->
					                    
					                  </form>
					                  <div class="form-group">
                                        <div class="col-sm-12">
                                         <div class="box-footer text-center">
                                            <button class="btn btn-success pull-right" type="button" onclick="mytools.closeModal('my_modal_view');"> 关闭 </button>
                                        </div>
                                        </div>
                                      </div>
					               </div>

									<div class="tab-pane" id="tabView_2">
										<form class="form-horizontal addFormBody" role="form" id="detailForm3"
											  action="javascript:void(0)">
											<input type="hidden" class="formToken" id="detailForm3_formToken"
												   name="formToken"/>
											<!-- temp="detailForm3_content" start -->
											<div id="detailForm3_content" data-temp-code="true" data-temp-type="addForm"
												 data-temp-form-id="detailForm3">
												<table class="table table-bordered bordercolor">
													<thead>
													<tr class="bg-info">
														<th class="w350">保障标题</th>
														<th class="w120">保障额度</th>
														<th>保障内容概述</th>
													</tr>
													</thead>
													<tbody id="detail-body3">
													</tbody>
												</table>
											</div>
											<!-- temp="detailForm3_content" end -->


											<div class="form-group">
												<div class="col-sm-12">
													<div class="box-footer text-center">
														<button class="btn btn-success pull-right" type="button" onclick="mytools.closeModal('my_modal_view');"> 关闭 </button>
													</div>
												</div>
											</div>

										</form>
									</div>

				            </div>
					            <!-- tab content e -->
				          </div>
					</div>
				</div>
				<!-- /.modal-content -->
	</div>		
</div>

<!-- Part 二、以下是template模板定义的模块区域 -->
<script type="text/template" id="dataList-template">
		<? for ( var i = 0; i < rows.length; i++) {?>
		<tr>
				<td><?=(pageObj.currentPage-1)*10+(i+1)?></td>
			<!-- temp="dataList_template_content" start -->
				<td style='display:none;'><input type="hidden" name="input_primaryKey" obj-name="ssInsurPro" primary="infoId" value="<?=strUtil.doNull(rows[i].ssInsurPro.infoId,'')?>"/></td>
				<td><?=strUtil.doNull(rows[i].ssInsurPro.insurShortName,'')?></td>
				<td><?=strUtil.doNull(rows[i].ssInsurPro.agentRiskCname,'')?></td>
				<td><?=strUtil.doNull(rows[i].ssInsurPro.proCode,'')?></td>
<%--				<td><?=strUtil.doNull(rows[i].ssInsurPro.riskName,'')?></td>--%>
				<td><?=strUtil.doNull(rows[i].ssInsurPro.riskCname,'')?></td>
				<td><?=dictListMap['proCategory'][strUtil.doNull(rows[i].ssInsurPro.proType,'')]?></td>
				<td><?=dictListMap['yesOrNo'][strUtil.doNull(rows[i].ssInsurPro.upFlag,'')]?></td>
				<td><?=strUtil.doNull(rows[i].ssInsurPro.createTime,'')?></td>
				<!-- temp="dataList_template_content" end -->
              <td>
				  <button type="button" class="btn btn-success btn-xs" onclick="toLoad(this,'view')"><i class="fa fa-info"></i> 查看</button>  
				  <button type="button" class="btn btn-warning btn-xs" onclick="toLoad(this,'edit');"><i class="fa fa-edit"></i> 修改</button>  
				  <?if('F'==rows[i].ssInsurPro.upFlag){?>
				  	<button type="button" class="btn btn-info btn-xs" onclick="toUpFlag('<?=rows[i].ssInsurPro.infoId?>','T','<?=rows[i].ssInsurPro.agentRiskCname?>');"><i class="fa fa-arrow-up"></i>上架</button>
				  <?} else{?>
				  	<button type="button" class="btn btn-info btn-xs" onclick="toUpFlag('<?=rows[i].ssInsurPro.infoId?>','F','<?=rows[i].ssInsurPro.agentRiskCname?>');"><i class="fa fa-arrow-down"></i>下架</button>
				  <?}?>
				  <button type="button" class="btn btn-danger btn-xs" onclick="toDele('<?=rows[i].ssInsurPro.infoId?>');"><i class="fa fa-trash-o"></i> 删除</button>
				  <button type="button" class="btn btn-primary btn-xs" onclick="toDetailSet('<?=rows[i].ssInsurPro.infoId?>','<?=rows[i].ssInsurPro.agentRiskCname?>');"><i class="fa fa-cog"></i> 详情配置</button>
			</td>
		</tr>
   <?}?>  		
</script>
<script type="text/template" id="detailSave-template">
	<? for ( var i = 0; i < rows.length; i++) {?>
	<tr>
		<td style="vertical-align: middle">
			<input type="hidden" class="w220" name="ssInsurProDetail.proId" value="<?=rows[i].ssInsurProDetail.proId?>"/>
			<input type="hidden" class="w220" name="ssInsurProDetail.detailType" value="CPBZ"/>
			<input name="ssInsurProDetail.title" class="form-control" value="<?=rows[i].ssInsurProDetail.title?>"/>
		</td>
		<td style="vertical-align: middle">
			<input name="ssInsurProDetail.quota" class="form-control" value="<?=rows[i].ssInsurProDetail.quota?>"/>
		</td>
		<td>
			<textarea class="form-control" rows="1" maxlength="1000" name="ssInsurProDetail.content"><?=rows[i].ssInsurProDetail.content?></textarea>
		</td>
		<td style="vertical-align: middle;text-align:center"><i class="fa fa-trash-o" onclick="javascript:$(this).parent().parent().remove();"></i></td>
	</tr>
	<?}?>
</script>
<script type="text/template" id="detailView-template">
	<? for ( var i = 0; i < rows.length; i++) {?>
	<tr>
		<td style="vertical-align: middle"><?=rows[i].ssInsurProDetail.title?></td>
		<td style="vertical-align: middle"><?=rows[i].ssInsurProDetail.quota?></td>
		<td><?=rows[i].ssInsurProDetail.content?></td>
	</tr>
	<?}?>
</script>
<!-- Part 三、 以下是js模块区域 -->
<script>
var clickMenu = "pro-list";
var myPage,dataListId,searchFormId,editProCode,editRiskCname;
myPage = 10;//定义列表数据
dataListId = "dataList";//显示列表数据div的id
searchFormId = "searchForm";//搜索表单Id
var this_proId = '';
/**
 * 初始化数据字典，id传入#id 返回值Map用法：dictListMap["userType"][rows[i].userType]
 */
var dictListMap = DictUtil.initDictAndDymic();
$(function () {
	//1、加载分页列表数据
	getTableData();
	
	//2、控制是否启用token
	//setToken();

	//设置数据行选中效果
	$('#'+dataListId+' tbody').on('click','tr', function (e) {
		if ( $(this).hasClass('selected') ) {
		}
		else {
			$('tr.selected').removeClass('selected');
			$(this).addClass('selected');
		}
		//var id = $('tr.selected th').eq(0).html();
	} );

 });
 
//注入日历框样式
var dateObject = $('.datepicker').datepicker( {
	language : 'zh-CN',
	//inline: true,
	todayBtn : "linked",
	format : "yyyy-mm-dd",
	autoclose: true
}).on('hide',function(e) {
	//bootstrap datepicker与bootstrapValidator同时使用时选择日期后无法正常触发校验的解决方法
	//当日期选择框关闭时，执行刷新校验。
	var fieldName = $(this).attr("name");//获取当前元素name
	var formId = $(this).parents("form").eq(0).attr("id");//获取当前元素所在父层级中的就近的formId
    $("#"+formId).data('bootstrapValidator').updateStatus(fieldName,'NOT_VALIDATED',null).validateField(fieldName);
});

//给模态窗口内form表单内的所有支持必填项的元素注入校验
$(".modal").on('shown.bs.modal', function () {
	$(this).find("form").each(function(){
		var formId = $(this).attr("id");
		// console.log('shown.bs.modal.formId',formId);
		if(!strUtil.isNull(formId)){
			var formId="#"+formId;
		 	setValidate(formId);//定义add表单验证属性
			mytools.cleanValidate(formId);//清空上次校验规则提示
		}
	});
});
//控制选项卡
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
	// 获取已激活的标签页的名称
	var id=$(e.target).attr("href");
	if(strUtil.isNull(this_proId)){
		layer.alert("请先保存基本信息！");
		e.preventDefault();
	}
});
function selectText(obj,id,name,isEdit){
	if("T"==isEdit){
        var selectedAttr = $(obj).find("option:selected").attr("insur-short-name");
		var selectedText = $(obj).find("option:selected").text();
		$(name).text(selectedAttr);
		$(id).val(selectedAttr);
	}else{
        var selectedAttr = $(obj).find("option:selected").attr("insur-short-name");
		var selectedText = $(obj).find("option:selected").text();
		$(name).text(selectedAttr);
		$(id).val(selectedAttr);
	}
}
//打开添加modal
function toAdd(){
	mytools.cleanData(".addFormBody");//清空表单元素上次填写的内容；
    $(".datepicker").val("");
    $("#my_modal_add").modal("show");
	$('.nav-tabs a[href=\"#tabAdd_1\"]').tab('show');
}
//添加一行保障明细文本框
function addDetail(bodyId) {
	var myData_detail = {rows:[{'ssInsurProDetail':{'title':'','proId':this_proId,'quota':'','content':''}}]};
	console.log('myData_detail',myData_detail);
	var data_detail = baidu.template("detailSave-template",eval(myData_detail));
	$("#"+bodyId).append(data_detail);
}
//数据toLoad读取（查看、编辑）数据
function toLoad(obj,type){
	if("view"==type){
		$("#my_modal_view").modal("show");
		$('.nav-tabs a[href=\"#tabView_1\"]').tab('show');
	}else if("edit"==type){
		mytools.cleanData(".editFormBody");//清空表单元素上次填写的内容；
		$("#my_modal_edit").modal("show");
		$('.nav-tabs a[href=\"#tabEdit_1\"]').tab('show');
	}
	var paramLoadData = {};
	var inputPrimaryObj = $(obj).parent().parent().find("input[name='input_primaryKey']");
	paramLoadData["pageName"]=$("#searchForm").find("input[name='pageName']").val();
	paramLoadData["formName"]=$("#searchForm").find("input[name='formName']").val();
	if(inputPrimaryObj.length>0){
        for(var k=0;k<inputPrimaryObj.length;k++){
            var pkobj=$(inputPrimaryObj[k]);
            paramLoadData[pkobj.attr("obj-name")+".w_"+pkobj.attr("primary")]=pkobj.val();
        }
		$.get(common_info_url, paramLoadData,function(myData){
			console.log(myData);
			//反显加载数据
			if(myData){
				FormUtil.loadView('ssInsurPro', myData['ssInsurPro'],"#my_modal_"+type);
				var obj = eval(myData['ssInsurPro']);
				if(obj){
					this_proId = obj['infoId'];
					$('.ssInsurPro_proId').val(this_proId);
					if("view"==type){
						getProDetailList(this_proId,'detail-body3','detailView');
					}else{
						getProDetailList(this_proId,'detail-body2','detailSave');
					}
				}
			}
	   	},"json");
	}
}
function getProDetailList(proId,bodyId,temp) {
	$("#"+bodyId).html('');
	$.ajax({
		type:"get",
		url:common_list_url,
		data: {'pageName':'ss-insur-pro-detail','formName':'searchForm','ssInsurProDetail.w_proId':proId},dataType:"json",
		success: function(myData){
			console.log('pro-detail.res',myData);
			if("T"==myData.flag) {
				var data = baidu.template(temp+"-template", eval(myData));
				$("#"+bodyId).html(data);
			}
		}
	});
}
function toDetailSet(proId,proName) {
	window.location.href=encodeURI(page_admin+"/pro/pro-list-detail-set?proId="+proId+"&proName="+proName);
}
//删除调用
function toDele(infoId){
	var index_load = layer.load(1, {shade: false});
	$.ajax({
		type: "get",
		url: common_list_url,
		data: {'pageName': 'ss-insur-pro-range', 'formName': 'searchForm', 'ssInsurProRange.w_proId': infoId},
		dataType: "json",
		success: function (myData) {
			layer.close(index_load);
			console.log('pro-range.res', myData);
			if (myData.total > 0) {
				layer.alert("请先删除该产品的详情配置");
				return;
			} else {
				var index_submit = layer.confirm("您确定要删除信息吗？", {btn: ["Yes","No"],closeBtn: 0,offset: "220px"}
				, function(){
					layer.close(index_submit);
					var paramData = {};
					paramData["pageName"]="ss-insur-pro";
					paramData["formName"]="delForm";
					paramData["ssInsurPro.w_infoId"]=infoId;
					$.ajax({
						type:"post",
						url:common_submit_url,
						data: paramData,dataType:"json",
						success: function(myData){
							var result = myData.flag;
							if(result=="T"){
								refresh();
							}else{
								layer.alert("删除失败！");
							}
						}
					});
				});
			}
		}
	});
}
//加载列表数据
function getTableData(){
    if(strUtil.isNull($("#"+searchFormId).find("input[name='pageName']").val())){return;}
    var index_load = layer.load(1, {shade: false});
	$.ajax({
		   type:'get',
		   url:common_list_url,
		   data:$("#"+searchFormId).serialize()+getCurrentPage(common_list_url+"?"+$("#"+searchFormId).serialize(),myPage),
		   dataType:'json',
		   success: function(myData){
		   	console.log(myData);
		   	if("T"==myData.flag){
			    var data = baidu.template(dataListId+"-template",eval(myData));
				$("#"+dataListId+"-body").html(data);
				  var option= {
						   ele:$("#"+dataListId+"-page")[0],
						   total:myData.total,
						   fn:getTableData,
						   url:common_list_url+"?"+$("#"+searchFormId).serialize()
					   }
					generatePages(option);

			   }
		    layer.close(index_load);
		   }
		});
  }

function preDisplayFormContent(obj,type,formId){
	$("#"+formId+"_content_remark").html(obj.content);
}

//提交tab1表单数据
function submitForm1(formId,tabId){
	//校验规则-表单提交时触发
	var validate = $('#'+formId).data('bootstrapValidator').validate();
	if(!validate.isValid()){ //如果校验不通过就返回
	    return;  
	}
	var index_submit = layer.confirm('您确定要保存信息吗？', {btn: ['Yes','No'],closeBtn: 0,offset: '220px'}
	, function(){
		var result = submitForm(formId,tabId);
		if(result){
			layer.alert("提交成功！", {closeBtn: 0 });
      		// mytools.closeModal("my_modal_add");
      		// mytools.closeModal("my_modal_edit");
			if("addForm1"==formId){
				this_proId = result.ids.ssInsurPro_infoId;
				$('.ssInsurPro_proId').val(this_proId);
			}
			mytools.closeModal("my_modal_add");
			mytools.closeModal("my_modal_edit");
      		refresh();
      		setToken();
    		if(!strUtil.isNull(tabId)){
      			$('.nav-tabs a[href=\"#'+tabId+'\"]').tab('show'); // Select tab by name 
      		}
	  	}
	});
	
 }
//提交表单数据
function submitForm(formId,tabId){
	var result;
	var index_load = layer.load(1, {shade: false});
	$.ajax({
	    type:'post',
	    url:common_submit_url,
	    data:$("#"+formId).serialize(),
	    async:false,
	    dataType:'json',
	    success: function(myData){ 
	     console.log(myData);
	        if(myData.flag=="T"){
	        	result = myData;
	    	}else{
	    		setToken();
	     		layer.alert(myData.msg);
	    	}
	        layer.close(index_load);
	  	},
	     error: function (e) {
		     layer.close(index_load);
     	} 
	});	
	return result;
}

function toCheckUnique(formId,proCode,riskCname) {
	var flag ='';
    var insurCode = $("#"+formId).find("input[name='ssInsurPro.insurCode']").val();
	$.ajax({
		type: 'get',
		url: common_info_url,
		data: {"pageName":"ss-insur-pro","formName":"searchForm","ssInsurPro.w_insurCode":insurCode,"ssInsurPro.wo_proCode":proCode,"ssInsurPro.wo_agentRiskCname":riskCname},
		dataType: 'json',
		async:false,
		success: function (myData) {
			console.log("myData",myData)
			if(myData){
				var obj = eval(myData['ssInsurPro']);
				if(obj){
					var proCodeVal = obj['proCode'];
					var agentRiskCname = obj['agentRiskCname'];
					if(proCodeVal == proCode){
						flag = "平台产品代码，请重新输入。";
					}
					if(agentRiskCname == riskCname){
						flag = "平台产品名称重复，请重新输入。";
					}
				}
			}
		}
	});
	return flag;
}

function toUpFlag(proId,upFlag,agentRiskCname) {
	var msg = "下架";
	if("T"==upFlag){
		msg = "上架";
		var flag = checkProDetail(proId);
		console.log(flag,"123123")
		if(flag){
			layer.alert("上架前至少配置一条保险方案期限信息！");
			return
		}
	}
	var index_submit = layer.confirm('您确定要'+msg+'产品【<span style="color: red">'+agentRiskCname+'</span>】吗？', {btn: ['Yes','No'],closeBtn: 0,offset: '220px'}
	, function(){
		layer.close(index_submit);
		var paramData = {};
		paramData["pageName"]="ss-insur-pro";
		paramData["formName"]="editForm";
		paramData["ssInsurPro.w_infoId"]=proId;
		paramData["ssInsurPro.upFlag"]=upFlag;
		$.ajax({
			type:"post",
			url:common_submit_url,
			data: paramData,dataType:"json",
			success: function(myData){
				var result = myData.flag;
				if(result=="T"){
					refresh();
				}else{
					layer.alert("操作失败！");
				}
			}
		});
	});


}
function checkProDetail(proId) {
	var flag = true;
	$.ajax({
		type: 'get',
		url: common_list_url,
		data: {"pageName":"ss-insur-pro-detail","formName":"searchForm","ssInsurProDetail.w_proId":proId},
		dataType: 'json',
		async:false,
		success: function (myData) {
			console.log("myData",myData);
			var total = myData.total;
			if(total>0){
				flag=false;
			}
		}
	});
	return flag;
}

//刷新
function refresh(){
	getTableData();
}
//设置token
function setToken(){
	$.ajax({
	    type:'get',
	    url:'${ctx}/sendPage/token?token=true',
	    dataType:'text',
	    success: function(myData){
	    	console.log(myData);
			$('.formToken').val(myData);
	  	}
	});	
}


/**** Part 四、以下是自定义新增方法  ****/
//1.定义校验规则-定义
function setValidate(id){
	$(id).each(function(){
		$(this).bootstrapValidator({
		    feedbackIcons: {
		        valid: 'glyphicon glyphicon-ok',
		        invalid: 'glyphicon glyphicon-remove',
		        validating: 'glyphicon glyphicon-refresh'
		    },/** 以下需要结合实际业务清空补充个表单元素的验证规则 **/
		 	fields:{
		 		/** 可自定义新增验证规则
		    	"uctUser.userEname":{
		    		 validators: {
		    			 regexp: {
		    				 regexp: /^[0-9]+$/,
		                      message: '只能是数字'
		                  }
		              }
		    	}
		    	**/
				}
		});
	});
}


</script>
</section>
<!-- Main end -->   
</div>
<!-- foot start -->
<%@include file="/common/ssb/foot.jsp" %>
<!-- foot start -->
</div>
<!-- /.content-wrapper -->
</body>
</html>














































